#!/bin/sh
#
# $OpenBSD: zarafa_server.rc,v 1.7 2016/04/01 18:08:10 robert Exp $

daemon="${TRUEPREFIX}/sbin/zarafa-server"

. /etc/rc.d/rc.subr

rc_pre() {
	i=0
	while [ $i -lt 10 ]; do
		${LOCALBASE}/bin/mysqladmin -s ping && break
		sleep 1
		i=$((i+1))
	done
	install -d -o _zarafa -g _zarafa /var/run/zarafad
}

rc_cmd $1
